<% content_for :left_sidebar do  %>
  <%= render :partial => "layouts/sidebar/xiwenguanli" %>
<% end %>


<%- model_class = Report -%>
<div class="page-header">
  <h1>讲座报告 - 详情</h1>
</div>

<dl class="dl-horizontal">
  <dt><strong>时间:</strong></dt>
  <dd><%= @report.time.strftime("%Y-%m-%d %H:%M") %></dd>
  <dt><strong>报告地点:</strong></dt>
  <dd><%= @report.place %></dd>
  <dt><strong>主办单位:</strong></dt>
  <dd><%= @report.department %></dd>
  <dt><strong>报告人:</strong></dt>
  <dd><%= @report.reporter %></dd>
  <dt><strong>报告题目:</strong></dt>
  <dd><%= @report.title %></dd>
  <dt><strong>备注:</strong></dt>
  <dd><%= raw @report.content %></dd>
  <dt><strong>发布人:</strong></dt>
  <dd><%= @report.postby %></dd>
  <dt><strong>审核状态:</strong></dt>
  <dd><%= @report.check_text %></dd>
  <% if @report.check == 3 %>
      <dt><strong>未采用原因:</strong></dt>
      <dd><%= @report.reason %></dd>
  <% end %>
  <dd>
    <%= form_tag reject_admins_report_path do %>
        <% if @report.check == 0 %>
            <%= link_to '确认送审',submit_admins_report_path(@report),:class => 'btn btn-primary' %>
        <% end %>
        <%= link_to '返回',admins_reports_path,:class => 'btn btn-info' %>
        <% if Report.can_approve?(@report,current_user) %>
            <%= link_to '确认采用',approve_admins_report_path(@report),:class => 'btn btn-primary btn-success' %>
            <%= hidden_field_tag :id,@report.id %>
            <%= submit_tag '确认不采用',:class => 'btn btn-primary btn-danger' %>
            <div style="margin-top: 5px;">
              <%= must_label %>如果不采用,请填写不采用原因:
              <%= text_field_tag :reason,'',required: "required" %>
            </div>
        <% end %>
    <% end %>
  </dd>

</dl>